package jaran.xiongcheng;
import jaran.Tomxk.reflect.User;

import java.lang.reflect.Method;
public class Appxiongcheng {
    public static void main(String[] args) throws Exception{
        User u = new User();
        u.setName("Timor");
        System.out.println(u.getName());
        Class<?> UU = Class.forName("cn.tedu.wyl.User");
        Object o = UU.newInstance();
        Method setName = UU.getMethod("setName", String.class);
        setName.invoke(o, "Jenkins");
        Method getName = UU.getMethod("getName");
        Object result = getName.invoke(o);
        System.out.println(result);
    }
}
